class CreateVeiculos < ActiveRecord::Migration
  def self.up
    create_table :veiculos do |t|
      t.column :nome, :string, :null => false
      t.column :descricao, :text
      t.column :modelo_id, :integer, :null => false
      t.column :cor, :string, :null => false
      t.column :potencia, :decimal, :null => false, :precision => 4, :scale => 2
      t.column :ano, :integer, :null => false
      t.column :combustivel_id, :integer, :null => false
      t.column :placa, :string
      t.column :endereco_da_placa, :text
    end
  end

  def self.down
    drop_table :veiculos
  end
end
